# -*- coding: utf-8 -*-
# @Author   : 白云酱
# Data      :
# Software  :pyCharm
# version   :python 3.10
# @File     :conftest.py

import pytest

from libs.driver_init import DriverInit

_driver = None


@pytest.fixture(scope='session')
def browser():
    global _driver
    if _driver is None:
        _driver = DriverInit()
    yield _driver
    print("退出浏览器!")
    _driver.to_browser().quit()
